<template>
	<view class="box">
		<view class="lottery" v-for="(item,index) in lotteryList" @click="lotteryoInfo(item.lottery_id)">
			<div class="left">
				<image :src="`../../static/images/${item.lottery_id}.png`" mode=""></image>
				<view class="conter">
					<view class="topName">
						{{item.lottery_name}}
					</view>
					<span>
							{{item.remarks}}
					</span>
				</view>
			</div>
			<div class="right">
				>
			</div>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				lotteryList:[] , // 彩票列表数据
			};
		},
		mounted(){
				uni.request({   // 请求彩票列表数据
					url:'http://api.aslegou.top/api/cptypelist',
					method:"GET",
					success:(res)=>{  // 成功回调
						this.lotteryList = res.data.list
						console.log(this.lotteryList);
					}
				})
		},
		methods:{
			lotteryoInfo(id){
				uni.navigateTo({
					url:`/pages/home/lotteryoInfo?lottery_id=${id}`
				})
			}
		}
	}
</script>

<style lang="scss">
.box{
	width:100%;
	// height:100vh;
	background-color: #ff5f7f;
	padding-top: 20rpx;
	padding-bottom: 20rpx;
	.lottery{
		width: 80%;
		margin: 10rpx auto;
		height: 150rpx;
		border-radius: 20rpx;
		background-color: #ffff;
		padding: 40rpx;
		display: flex;
		justify-content: space-between;
		.left{
			display: flex;
			image{
				width: 150rpx;
				height: 150rpx;
				border-radius: 50%;
			}
			.conter{
				line-height: 70rpx;
				.topName{
					font-weight: 900;
					font-size: 40rpx;
				}
				span{
					color: #ccc;
				}
			}
		}
		.right{
			line-height: 150rpx;
			color: #ccc;
		}
	}
}
</style>
